<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>libasyncd: /home/wolkykim/ws/libasyncd/include/asyncd/ad_http_handler.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">libasyncd
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('ad__http__handler_8h_source.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">ad_http_handler.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="ad__http__handler_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/******************************************************************************</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * libasyncd</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Copyright (c) 2014 Seungyoung Kim.</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * All rights reserved.</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * Redistribution and use in source and binary forms, with or without</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * modification, are permitted provided that the following conditions are met:</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * 1. Redistributions of source code must retain the above copyright notice,</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> *    this list of conditions and the following disclaimer.</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * 2. Redistributions in binary form must reproduce the above copyright notice,</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> *    this list of conditions and the following disclaimer in the documentation</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> *    and/or other materials provided with the distribution.</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot;</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment"> * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"> * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment"> * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="comment"> * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment"> * POSSIBILITY OF SUCH DAMAGE.</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="comment"> *****************************************************************************/</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="comment"></span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="comment">/**</span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="comment"> * ad_http_handler header file</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="comment"> * @file ad_http_handler.h</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">#ifndef _AD_HTTP_HANDLER_H</span></div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define _AD_HTTP_HANDLER_H</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">#include &quot;qlibc/qlibc.h&quot;</span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="comment">/*----------------------------------------------------------------------------*\</span></div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="comment">|                           HTTP PROTOCOL SPECIFICS                            |</span></div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="comment">\*----------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="comment">/* HTTP PROTOCOL CODES */</span></div>
<div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#a037c9e7fb06bd5a319011a220c71f866">   49</a></span>&#160;<span class="preprocessor">#define HTTP_PROTOCOL_09    &quot;HTTP/0.9&quot;</span></div>
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#a398b05c4fb1d7f2659fb67a00009ba83">   50</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define HTTP_PROTOCOL_10    &quot;HTTP/1.0&quot;</span></div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#aba396af03e2875b5ddedee43ad3c4707">   51</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define HTTP_PROTOCOL_11    &quot;HTTP/1.1&quot;</span></div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="comment">/* HTTP RESPONSE CODES */</span></div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#ad02ab7af04409020264521a798de2a5a">   54</a></span>&#160;<span class="preprocessor">#define HTTP_NO_RESPONSE                (0)</span></div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#ad1f324698e12fefadfc2ec5d16ce6a5b">   55</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define HTTP_CODE_CONTINUE              (100)</span></div>
<div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#a471de168f41ecf5e8d62a43fea28b5d7">   56</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define HTTP_CODE_OK                    (200)</span></div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#a00c11c6c6bf42cf1fb483c273454cf45">   57</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define HTTP_CODE_CREATED               (201)</span></div>
<div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#a7e41c8a47383e2bdf4b34ce5510bc9b6">   58</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define HTTP_CODE_NO_CONTENT            (204)</span></div>
<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#a57da3583490d37abb674773f712491fd">   59</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define HTTP_CODE_PARTIAL_CONTENT       (206)</span></div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#a463a0b7aed650158725b205bc1bd0de8">   60</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define HTTP_CODE_MULTI_STATUS          (207)</span></div>
<div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#a33f32423ccbf3a2a61f56cc5aee18cd8">   61</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define HTTP_CODE_MOVED_TEMPORARILY     (302)</span></div>
<div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#a225a5999b63c699c4492a8412b315452">   62</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define HTTP_CODE_NOT_MODIFIED          (304)</span></div>
<div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#a16c7e21f17349c2515fe0134f9b7ffd4">   63</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define HTTP_CODE_BAD_REQUEST           (400)</span></div>
<div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#a4667745cca24cb084488393a562647aa">   64</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define HTTP_CODE_UNAUTHORIZED          (401)</span></div>
<div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#ac68e0a1d868dad52967d757dab5220db">   65</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define HTTP_CODE_FORBIDDEN             (403)</span></div>
<div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#a20eb5cc8af538c827de0f7ed9811243c">   66</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define HTTP_CODE_NOT_FOUND             (404)</span></div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#a7c8d72a7d4eda32ad9a6211958463e97">   67</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define HTTP_CODE_METHOD_NOT_ALLOWED    (405)</span></div>
<div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#a78c49465c70c576daa60e34a84a9e47c">   68</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define HTTP_CODE_REQUEST_TIME_OUT      (408)</span></div>
<div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#a0eeb0f3801fbd1ca5d0f050e12426768">   69</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define HTTP_CODE_GONE                  (410)</span></div>
<div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#a0023f7e49348c8c52b2fb8b547202ed3">   70</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define HTTP_CODE_REQUEST_URI_TOO_LONG  (414)</span></div>
<div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#af370c9b66441321e2c3fa3fc01fbc35c">   71</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define HTTP_CODE_LOCKED                (423)</span></div>
<div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#a6d47746cc8b934944ed4f05308b2da63">   72</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define HTTP_CODE_INTERNAL_SERVER_ERROR (500)</span></div>
<div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#a9e272d1190eb37ce4447a9021f68a0c4">   73</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define HTTP_CODE_NOT_IMPLEMENTED       (501)</span></div>
<div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#a00a05677bf92a38abf5be28b5ce0d294">   74</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define HTTP_CODE_SERVICE_UNAVAILABLE   (503)</span></div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;<span class="comment">/* DEFAULT BEHAVIORS */</span></div>
<div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#aca074be7a96314dfc8fd39e49b563977">   77</a></span>&#160;<span class="preprocessor">#define HTTP_CRLF &quot;\r\n&quot;</span></div>
<div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#a320e59775effe7afcab43ecc01da7b3a">   78</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define HTTP_DEF_CONTENTTYPE &quot;application/octet-stream&quot;</span></div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;<span class="comment">/*----------------------------------------------------------------------------*\</span></div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;<span class="comment">|                                 TYPEDEFS                                     |</span></div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;<span class="comment">\*----------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#aab3c97042939726fecc74885bf7da46e">   83</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structad__http__s.html">ad_http_s</a> <a class="code" href="structad__http__s.html">ad_http_t</a>;</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;<span class="comment"></span></div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;<span class="comment">/*!&lt; Hook type */</span></div>
<div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#a39f327ff61b9f55900a617a1b276dd5d">   86</a></span>&#160;<span class="preprocessor">#define AD_HOOK_ALL               (0)         </span><span class="comment">/*!&lt; call on each and every phases */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#a34398c7c7f8cc256833b010804dd80fc">   87</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define AD_HOOK_ON_CONNECT        (1)         </span><span class="comment">/*!&lt; call right after the establishment of connection */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#a3e4b5b7d8d4a1d0c19b406ea4892c94d">   88</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define AD_HOOK_AFTER_REQUESTLINE (1 &lt;&lt; 2)    </span><span class="comment">/*!&lt; call after parsing request line */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#ab51441a3e5c01b55610c999285323688">   89</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define AD_HOOK_AFTER_HEADER      (1 &lt;&lt; 3)    </span><span class="comment">/*!&lt; call after parsing all headers */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#a0f7140c7f5fd95bff8a271e8bfae008e">   90</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define AD_HOOK_ON_BODY           (1 &lt;&lt; 4)    </span><span class="comment">/*!&lt; call on every time body data received */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#a526d717fa61a65165d1dce7b93a1a815">   91</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define AD_HOOK_ON_REQUEST        (1 &lt;&lt; 5)    </span><span class="comment">/*!&lt; call with complete request */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#ac096c79db499c73dce8bfbceb032fbb2">   92</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define AD_HOOK_ON_CLOSE          (1 &lt;&lt; 6)    </span><span class="comment">/*!&lt; call right before closing or next request */</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00094"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#a5492f236970d745247b5f5ba47eb9b82">   94</a></span>&#160;<span class="keyword">enum</span> <a class="code" href="ad__http__handler_8h.html#a5492f236970d745247b5f5ba47eb9b82">ad_http_request_status_e</a> {</div>
<div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#a5492f236970d745247b5f5ba47eb9b82a88e79c29b449f61e6f43e94410d44927">   95</a></span>&#160;    <a class="code" href="ad__http__handler_8h.html#a5492f236970d745247b5f5ba47eb9b82a88e79c29b449f61e6f43e94410d44927">AD_HTTP_REQ_INIT</a> = 0,        <span class="comment">/*!&lt; initial state */</span></div>
<div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#a5492f236970d745247b5f5ba47eb9b82affd34a388ff3929b99933aaa58d298a9">   96</a></span>&#160;    <a class="code" href="ad__http__handler_8h.html#a5492f236970d745247b5f5ba47eb9b82affd34a388ff3929b99933aaa58d298a9">AD_HTTP_REQ_REQUESTLINE_DONE</a>,<span class="comment">/*!&lt; received 1st line */</span></div>
<div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#a5492f236970d745247b5f5ba47eb9b82a4f8f5da8e1d8346eba285fd27bcd9811">   97</a></span>&#160;    <a class="code" href="ad__http__handler_8h.html#a5492f236970d745247b5f5ba47eb9b82a4f8f5da8e1d8346eba285fd27bcd9811">AD_HTTP_REQ_HEADER_DONE</a>,     <span class="comment">/*!&lt; received headers completely */</span></div>
<div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#a5492f236970d745247b5f5ba47eb9b82a83f0b967f8a75292986a0ecc24a3d104">   98</a></span>&#160;    <a class="code" href="ad__http__handler_8h.html#a5492f236970d745247b5f5ba47eb9b82a83f0b967f8a75292986a0ecc24a3d104">AD_HTTP_REQ_DONE</a>,            <span class="comment">/*!&lt; received body completely. no more data expected */</span></div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;</div>
<div class="line"><a name="l00100"></a><span class="lineno"><a class="line" href="ad__http__handler_8h.html#a5492f236970d745247b5f5ba47eb9b82afe1bedd5b77a55a05f855420ca55e073">  100</a></span>&#160;    <a class="code" href="ad__http__handler_8h.html#a5492f236970d745247b5f5ba47eb9b82afe1bedd5b77a55a05f855420ca55e073">AD_HTTP_ERROR</a>,               <span class="comment">/*!&lt; unrecoverable error found. */</span></div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;};</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;<span class="comment">/*----------------------------------------------------------------------------*\</span></div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;<span class="comment">|                             PUBLIC FUNCTIONS                                 |</span></div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;<span class="comment">\*----------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="ad__http__handler_8h.html#a6b65a1411892e20395127d00502a2c44">ad_http_handler</a>(<span class="keywordtype">short</span> event, <a class="code" href="structad__conn__s.html">ad_conn_t</a> *conn, <span class="keywordtype">void</span> *userdata);</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;<span class="keyword">extern</span> <span class="keyword">enum</span> <a class="code" href="ad__http__handler_8h.html#a5492f236970d745247b5f5ba47eb9b82">ad_http_request_status_e</a> <a class="code" href="ad__http__handler_8h.html#a20357ffbba80b590ad70f451b2ae299e">ad_http_get_status</a>(<a class="code" href="structad__conn__s.html">ad_conn_t</a> *conn);</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;<span class="keyword">extern</span> <span class="keyword">struct </span>evbuffer *<a class="code" href="ad__http__handler_8h.html#a9b8117eea824b918f2cc0d80251dfe3a">ad_http_get_inbuf</a>(<a class="code" href="structad__conn__s.html">ad_conn_t</a> *conn);</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;<span class="keyword">extern</span> <span class="keyword">struct </span>evbuffer *<a class="code" href="ad__http__handler_8h.html#af5085188b8be2e7ab290fe0ec22789b4">ad_http_get_outbuf</a>(<a class="code" href="structad__conn__s.html">ad_conn_t</a> *conn);</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="ad__http__handler_8h.html#aa931a4adcd07f3bc23fe4f183dc4c8dc">ad_http_get_request_header</a>(<a class="code" href="structad__conn__s.html">ad_conn_t</a> *conn, <span class="keyword">const</span> <span class="keywordtype">char</span> *name);</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;<span class="keyword">extern</span> off_t <a class="code" href="ad__http__handler_8h.html#ac07e895997348c2885722f98c3260438">ad_http_get_content_length</a>(<a class="code" href="structad__conn__s.html">ad_conn_t</a> *conn);</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">size_t</span> <a class="code" href="ad__http__handler_8h.html#a468ef4268a9a7c71dfce494c446ebcb5">ad_http_get_content_length_stored</a>(<a class="code" href="structad__conn__s.html">ad_conn_t</a> *conn);</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> *<a class="code" href="ad__http__handler_8h.html#a4d28e689e120cfa22217507c74683779">ad_http_get_content</a>(<a class="code" href="structad__conn__s.html">ad_conn_t</a> *conn, <span class="keywordtype">size_t</span> maxsize, <span class="keywordtype">size_t</span> *storedsize);</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="ad__http__handler_8h.html#ae6a1a9707180447257fd769b249ee42d">ad_http_is_keepalive_request</a>(<a class="code" href="structad__conn__s.html">ad_conn_t</a> *conn);</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="ad__http__handler_8h.html#a59ed09afcce36474000c6cded0bd7b64">ad_http_set_response_header</a>(<a class="code" href="structad__conn__s.html">ad_conn_t</a> *conn, <span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keyword">const</span> <span class="keywordtype">char</span> *value);</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="ad__http__handler_8h.html#a073c5cb0c9724167031e80907890fb88">ad_http_get_response_header</a>(<a class="code" href="structad__conn__s.html">ad_conn_t</a> *conn, <span class="keyword">const</span> <span class="keywordtype">char</span> *name);</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="ad__http__handler_8h.html#afe22e6f81773c01d316e45009996c4a3">ad_http_set_response_code</a>(<a class="code" href="structad__conn__s.html">ad_conn_t</a> *conn, <span class="keywordtype">int</span> code, <span class="keyword">const</span> <span class="keywordtype">char</span> *reason);</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="ad__http__handler_8h.html#a048a0e35599f8a884494deba0dbd89b7">ad_http_set_response_content</a>(<a class="code" href="structad__conn__s.html">ad_conn_t</a> *conn, <span class="keyword">const</span> <span class="keywordtype">char</span> *contenttype, off_t size);</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">size_t</span> <a class="code" href="ad__http__handler_8h.html#aa54a1f3393b20b70f2769b3d039f3bd7">ad_http_response</a>(<a class="code" href="structad__conn__s.html">ad_conn_t</a> *conn, <span class="keywordtype">int</span> code, <span class="keyword">const</span> <span class="keywordtype">char</span> *contenttype, <span class="keyword">const</span> <span class="keywordtype">void</span> *data, off_t size);</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">size_t</span> <a class="code" href="ad__http__handler_8h.html#a9067ac0cfb15136e63c134a5292e7716">ad_http_send_header</a>(<a class="code" href="structad__conn__s.html">ad_conn_t</a> *conn);</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">size_t</span> <a class="code" href="ad__http__handler_8h.html#a5be41fc8a08dcadf94fc271aeb05b6e2">ad_http_send_data</a>(<a class="code" href="structad__conn__s.html">ad_conn_t</a> *conn, <span class="keyword">const</span> <span class="keywordtype">void</span> *data, <span class="keywordtype">size_t</span> size);</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">size_t</span> <a class="code" href="ad__http__handler_8h.html#a515f6b88b99a19e5c0ccdfd43b0e29ad">ad_http_send_chunk</a>(<a class="code" href="structad__conn__s.html">ad_conn_t</a> *conn, <span class="keyword">const</span> <span class="keywordtype">void</span> *data, <span class="keywordtype">size_t</span> size);</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="ad__http__handler_8h.html#afeef7409bd771bcf2e29eb6ab70af894">ad_http_get_reason</a>(<span class="keywordtype">int</span> code);</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;<span class="comment">/*---------------------------------------------------------------------------*\</span></div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;<span class="comment">|                            DATA STRUCTURES                                  |</span></div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;<span class="comment">\*---------------------------------------------------------------------------*/</span></div>
<div class="line"><a name="l00133"></a><span class="lineno"><a class="line" href="structad__http__s.html">  133</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structad__http__s.html">ad_http_s</a> {</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    <span class="comment">// HTTP Request</span></div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    <span class="keyword">struct </span>{</div>
<div class="line"><a name="l00136"></a><span class="lineno"><a class="line" href="structad__http__s.html#a08609c6955339c939e1f46f8e00e164e">  136</a></span>&#160;        <span class="keyword">enum</span> <a class="code" href="ad__http__handler_8h.html#a5492f236970d745247b5f5ba47eb9b82">ad_http_request_status_e</a> <a class="code" href="structad__http__s.html#a08609c6955339c939e1f46f8e00e164e">status</a>;  <span class="comment">/*!&lt; request status. */</span></div>
<div class="line"><a name="l00137"></a><span class="lineno"><a class="line" href="structad__http__s.html#adb7444a8f1879654976dbde11b27bcee">  137</a></span>&#160;        <span class="keyword">struct </span>evbuffer *<a class="code" href="structad__http__s.html#adb7444a8f1879654976dbde11b27bcee">inbuf</a>;  <span class="comment">/*!&lt; input data buffer. */</span></div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;        <span class="comment">// request line - available on REQ_REQUESTLINE_DONE.</span></div>
<div class="line"><a name="l00140"></a><span class="lineno"><a class="line" href="structad__http__s.html#aa01e34066ff0db7db68172c9089f6e69">  140</a></span>&#160;        <span class="keywordtype">char</span> *<a class="code" href="structad__http__s.html#aa01e34066ff0db7db68172c9089f6e69">method</a>;   <span class="comment">/*!&lt; request method ex) GET */</span></div>
<div class="line"><a name="l00141"></a><span class="lineno"><a class="line" href="structad__http__s.html#a2192371be64acdb89a64f00c5890cbf3">  141</a></span>&#160;        <span class="keywordtype">char</span> *<a class="code" href="structad__http__s.html#a2192371be64acdb89a64f00c5890cbf3">uri</a>;      <span class="comment">/*!&lt; url+query ex) /data%20path?query=the%20value */</span></div>
<div class="line"><a name="l00142"></a><span class="lineno"><a class="line" href="structad__http__s.html#a13091fc281ea98166a82dbb3a3b0a8fb">  142</a></span>&#160;        <span class="keywordtype">char</span> *<a class="code" href="structad__http__s.html#a13091fc281ea98166a82dbb3a3b0a8fb">httpver</a>;  <span class="comment">/*!&lt; version ex) HTTP/1.1 */</span></div>
<div class="line"><a name="l00143"></a><span class="lineno"><a class="line" href="structad__http__s.html#a50f31e3ca4954f6ae7d8944e531e7609">  143</a></span>&#160;        <span class="keywordtype">char</span> *<a class="code" href="structad__http__s.html#a50f31e3ca4954f6ae7d8944e531e7609">path</a>;     <span class="comment">/*!&lt; decoded path ex) /data path */</span></div>
<div class="line"><a name="l00144"></a><span class="lineno"><a class="line" href="structad__http__s.html#a007aa07af67fc4bf6d3aa62e726a8527">  144</a></span>&#160;        <span class="keywordtype">char</span> *<a class="code" href="structad__http__s.html#a007aa07af67fc4bf6d3aa62e726a8527">query</a>;    <span class="comment">/*!&lt; query string ex) query=the%20value */</span></div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;        <span class="comment">// request header - available on REQ_HEADER_DONE.</span></div>
<div class="line"><a name="l00147"></a><span class="lineno"><a class="line" href="structad__http__s.html#a1b087616782ae37954bc9c84efcddfcb">  147</a></span>&#160;        qlisttbl_t *<a class="code" href="structad__http__s.html#a1b087616782ae37954bc9c84efcddfcb">headers</a>;  <span class="comment">/*!&lt; parsed request header entries */</span></div>
<div class="line"><a name="l00148"></a><span class="lineno"><a class="line" href="structad__http__s.html#a77545254e60b3c635c49efa321cfb054">  148</a></span>&#160;        <span class="keywordtype">char</span> *<a class="code" href="structad__http__s.html#a77545254e60b3c635c49efa321cfb054">host</a>;           <span class="comment">/*!&lt; host ex) www.domain.com or www.domain.com:8080 */</span></div>
<div class="line"><a name="l00149"></a><span class="lineno"><a class="line" href="structad__http__s.html#a129ec0244515d298b2d27bf99716e0b9">  149</a></span>&#160;        <span class="keywordtype">char</span> *<a class="code" href="structad__http__s.html#a129ec0244515d298b2d27bf99716e0b9">domain</a>;         <span class="comment">/*!&lt; domain name ex) www.domain.com (no port number) */</span></div>
<div class="line"><a name="l00150"></a><span class="lineno"><a class="line" href="structad__http__s.html#a403c92ef9659a9ba550d17ee9745fd94">  150</a></span>&#160;        off_t <a class="code" href="structad__http__s.html#a403c92ef9659a9ba550d17ee9745fd94">contentlength</a>;  <span class="comment">/*!&lt; value of Content-Length header.*/</span></div>
<div class="line"><a name="l00151"></a><span class="lineno"><a class="line" href="structad__http__s.html#abae1ecb8ffe1c2b514f8a490ed0364c6">  151</a></span>&#160;        <span class="keywordtype">size_t</span> <a class="code" href="structad__http__s.html#abae1ecb8ffe1c2b514f8a490ed0364c6">bodyin</a>;        <span class="comment">/*!&lt; bytes moved to in-buff */</span></div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;    } <a class="code" href="structad__http__s.html#a64ea17af0a96e99853d6fc2a08bfe23b">request</a>;</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;    <span class="comment">// HTTP Response</span></div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    <span class="keyword">struct </span>{</div>
<div class="line"><a name="l00156"></a><span class="lineno"><a class="line" href="structad__http__s.html#a91a877df088b8c66af600e14948d0b6d">  156</a></span>&#160;        <span class="keyword">struct </span>evbuffer *<a class="code" href="structad__http__s.html#a91a877df088b8c66af600e14948d0b6d">outbuf</a>;  <span class="comment">/*!&lt; output data buffer. */</span></div>
<div class="line"><a name="l00157"></a><span class="lineno"><a class="line" href="structad__http__s.html#a292d39919e0834e76e44621d052a9a95">  157</a></span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="structad__http__s.html#a292d39919e0834e76e44621d052a9a95">frozen_header</a>;       <span class="comment">/*!&lt; indicator whether we sent header out or not */</span></div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;        <span class="comment">// response headers</span></div>
<div class="line"><a name="l00160"></a><span class="lineno"><a class="line" href="structad__http__s.html#ad9b68dc98b0718b42b7ad1ced7d415f5">  160</a></span>&#160;        <span class="keywordtype">int</span> <a class="code" href="structad__http__s.html#ad9b68dc98b0718b42b7ad1ced7d415f5">code</a>;               <span class="comment">/*!&lt; response status-code */</span></div>
<div class="line"><a name="l00161"></a><span class="lineno"><a class="line" href="structad__http__s.html#ac812fecbfc3d456fa089cae226b7c600">  161</a></span>&#160;        <span class="keywordtype">char</span> *<a class="code" href="structad__http__s.html#ac812fecbfc3d456fa089cae226b7c600">reason</a>;           <span class="comment">/*!&lt; reason-phrase */</span></div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;        qlisttbl_t *<a class="code" href="structad__http__s.html#a1b087616782ae37954bc9c84efcddfcb">headers</a>;    <span class="comment">/*!&lt; response header entries */</span></div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;        off_t <a class="code" href="structad__http__s.html#a403c92ef9659a9ba550d17ee9745fd94">contentlength</a>;    <span class="comment">/*!&lt; content length in response */</span></div>
<div class="line"><a name="l00164"></a><span class="lineno"><a class="line" href="structad__http__s.html#a540f3f70258433ff7568283f6e478261">  164</a></span>&#160;        <span class="keywordtype">size_t</span> <a class="code" href="structad__http__s.html#a540f3f70258433ff7568283f6e478261">bodyout</a>;         <span class="comment">/*!&lt; bytes added to out-buffer */</span></div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;    } <a class="code" href="structad__http__s.html#a8aa9b5bba38a8e02cbdfc96e654db1d9">response</a>;</div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;};</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;</div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;<span class="preprocessor"></span>}</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/*_AD_HTTP_HANDLER_H */</span><span class="preprocessor"></span></div>
<div class="ttc" id="structad__http__s_html_ac812fecbfc3d456fa089cae226b7c600"><div class="ttname"><a href="structad__http__s.html#ac812fecbfc3d456fa089cae226b7c600">ad_http_s::reason</a></div><div class="ttdeci">char * reason</div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8h_source.html#l00161">ad_http_handler.h:161</a></div></div>
<div class="ttc" id="structad__http__s_html_a007aa07af67fc4bf6d3aa62e726a8527"><div class="ttname"><a href="structad__http__s.html#a007aa07af67fc4bf6d3aa62e726a8527">ad_http_s::query</a></div><div class="ttdeci">char * query</div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8h_source.html#l00144">ad_http_handler.h:144</a></div></div>
<div class="ttc" id="structad__http__s_html_a91a877df088b8c66af600e14948d0b6d"><div class="ttname"><a href="structad__http__s.html#a91a877df088b8c66af600e14948d0b6d">ad_http_s::outbuf</a></div><div class="ttdeci">struct evbuffer * outbuf</div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8h_source.html#l00156">ad_http_handler.h:156</a></div></div>
<div class="ttc" id="ad__http__handler_8h_html_a6b65a1411892e20395127d00502a2c44"><div class="ttname"><a href="ad__http__handler_8h.html#a6b65a1411892e20395127d00502a2c44">ad_http_handler</a></div><div class="ttdeci">int ad_http_handler(short event, ad_conn_t *conn, void *userdata)</div><div class="ttdoc">HTTP protocol handler hook. </div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8c_source.html#l00084">ad_http_handler.c:84</a></div></div>
<div class="ttc" id="ad__http__handler_8h_html_a468ef4268a9a7c71dfce494c446ebcb5"><div class="ttname"><a href="ad__http__handler_8h.html#a468ef4268a9a7c71dfce494c446ebcb5">ad_http_get_content_length_stored</a></div><div class="ttdeci">size_t ad_http_get_content_length_stored(ad_conn_t *conn)</div><div class="ttdoc">Return the actual size of data stored in in-buffer. </div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8c_source.html#l00157">ad_http_handler.c:157</a></div></div>
<div class="ttc" id="ad__http__handler_8h_html_a073c5cb0c9724167031e80907890fb88"><div class="ttname"><a href="ad__http__handler_8h.html#a073c5cb0c9724167031e80907890fb88">ad_http_get_response_header</a></div><div class="ttdeci">const char * ad_http_get_response_header(ad_conn_t *conn, const char *name)</div><div class="ttdoc">Get response header. </div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8c_source.html#l00254">ad_http_handler.c:254</a></div></div>
<div class="ttc" id="ad__http__handler_8h_html_a5492f236970d745247b5f5ba47eb9b82a88e79c29b449f61e6f43e94410d44927"><div class="ttname"><a href="ad__http__handler_8h.html#a5492f236970d745247b5f5ba47eb9b82a88e79c29b449f61e6f43e94410d44927">AD_HTTP_REQ_INIT</a></div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8h_source.html#l00095">ad_http_handler.h:95</a></div></div>
<div class="ttc" id="ad__http__handler_8h_html_af5085188b8be2e7ab290fe0ec22789b4"><div class="ttname"><a href="ad__http__handler_8h.html#af5085188b8be2e7ab290fe0ec22789b4">ad_http_get_outbuf</a></div><div class="ttdeci">struct evbuffer * ad_http_get_outbuf(ad_conn_t *conn)</div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8c_source.html#l00128">ad_http_handler.c:128</a></div></div>
<div class="ttc" id="structad__http__s_html"><div class="ttname"><a href="structad__http__s.html">ad_http_s</a></div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8h_source.html#l00133">ad_http_handler.h:133</a></div></div>
<div class="ttc" id="ad__http__handler_8h_html_a20357ffbba80b590ad70f451b2ae299e"><div class="ttname"><a href="ad__http__handler_8h.html#a20357ffbba80b590ad70f451b2ae299e">ad_http_get_status</a></div><div class="ttdeci">enum ad_http_request_status_e ad_http_get_status(ad_conn_t *conn)</div><div class="ttdoc">Return the request status. </div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8c_source.html#l00116">ad_http_handler.c:116</a></div></div>
<div class="ttc" id="ad__http__handler_8h_html_a515f6b88b99a19e5c0ccdfd43b0e29ad"><div class="ttname"><a href="ad__http__handler_8h.html#a515f6b88b99a19e5c0ccdfd43b0e29ad">ad_http_send_chunk</a></div><div class="ttdeci">size_t ad_http_send_chunk(ad_conn_t *conn, const void *data, size_t size)</div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8c_source.html#l00394">ad_http_handler.c:394</a></div></div>
<div class="ttc" id="ad__http__handler_8h_html_ac07e895997348c2885722f98c3260438"><div class="ttname"><a href="ad__http__handler_8h.html#ac07e895997348c2885722f98c3260438">ad_http_get_content_length</a></div><div class="ttdeci">off_t ad_http_get_content_length(ad_conn_t *conn)</div><div class="ttdoc">Return the size of content from the request. </div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8c_source.html#l00148">ad_http_handler.c:148</a></div></div>
<div class="ttc" id="ad__http__handler_8h_html_a9067ac0cfb15136e63c134a5292e7716"><div class="ttname"><a href="ad__http__handler_8h.html#a9067ac0cfb15136e63c134a5292e7716">ad_http_send_header</a></div><div class="ttdeci">size_t ad_http_send_header(ad_conn_t *conn)</div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8c_source.html#l00331">ad_http_handler.c:331</a></div></div>
<div class="ttc" id="structad__http__s_html_a292d39919e0834e76e44621d052a9a95"><div class="ttname"><a href="structad__http__s.html#a292d39919e0834e76e44621d052a9a95">ad_http_s::frozen_header</a></div><div class="ttdeci">bool frozen_header</div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8h_source.html#l00157">ad_http_handler.h:157</a></div></div>
<div class="ttc" id="structad__http__s_html_ad9b68dc98b0718b42b7ad1ced7d415f5"><div class="ttname"><a href="structad__http__s.html#ad9b68dc98b0718b42b7ad1ced7d415f5">ad_http_s::code</a></div><div class="ttdeci">int code</div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8h_source.html#l00160">ad_http_handler.h:160</a></div></div>
<div class="ttc" id="structad__http__s_html_a50f31e3ca4954f6ae7d8944e531e7609"><div class="ttname"><a href="structad__http__s.html#a50f31e3ca4954f6ae7d8944e531e7609">ad_http_s::path</a></div><div class="ttdeci">char * path</div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8h_source.html#l00143">ad_http_handler.h:143</a></div></div>
<div class="ttc" id="ad__http__handler_8h_html_a5492f236970d745247b5f5ba47eb9b82affd34a388ff3929b99933aaa58d298a9"><div class="ttname"><a href="ad__http__handler_8h.html#a5492f236970d745247b5f5ba47eb9b82affd34a388ff3929b99933aaa58d298a9">AD_HTTP_REQ_REQUESTLINE_DONE</a></div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8h_source.html#l00096">ad_http_handler.h:96</a></div></div>
<div class="ttc" id="structad__http__s_html_a8aa9b5bba38a8e02cbdfc96e654db1d9"><div class="ttname"><a href="structad__http__s.html#a8aa9b5bba38a8e02cbdfc96e654db1d9">ad_http_s::response</a></div><div class="ttdeci">struct ad_http_s::@1 response</div></div>
<div class="ttc" id="structad__http__s_html_a13091fc281ea98166a82dbb3a3b0a8fb"><div class="ttname"><a href="structad__http__s.html#a13091fc281ea98166a82dbb3a3b0a8fb">ad_http_s::httpver</a></div><div class="ttdeci">char * httpver</div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8h_source.html#l00142">ad_http_handler.h:142</a></div></div>
<div class="ttc" id="ad__http__handler_8h_html_a9b8117eea824b918f2cc0d80251dfe3a"><div class="ttname"><a href="ad__http__handler_8h.html#a9b8117eea824b918f2cc0d80251dfe3a">ad_http_get_inbuf</a></div><div class="ttdeci">struct evbuffer * ad_http_get_inbuf(ad_conn_t *conn)</div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8c_source.html#l00123">ad_http_handler.c:123</a></div></div>
<div class="ttc" id="structad__http__s_html_a2192371be64acdb89a64f00c5890cbf3"><div class="ttname"><a href="structad__http__s.html#a2192371be64acdb89a64f00c5890cbf3">ad_http_s::uri</a></div><div class="ttdeci">char * uri</div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8h_source.html#l00141">ad_http_handler.h:141</a></div></div>
<div class="ttc" id="ad__http__handler_8h_html_a5492f236970d745247b5f5ba47eb9b82afe1bedd5b77a55a05f855420ca55e073"><div class="ttname"><a href="ad__http__handler_8h.html#a5492f236970d745247b5f5ba47eb9b82afe1bedd5b77a55a05f855420ca55e073">AD_HTTP_ERROR</a></div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8h_source.html#l00100">ad_http_handler.h:100</a></div></div>
<div class="ttc" id="ad__http__handler_8h_html_a59ed09afcce36474000c6cded0bd7b64"><div class="ttname"><a href="ad__http__handler_8h.html#a59ed09afcce36474000c6cded0bd7b64">ad_http_set_response_header</a></div><div class="ttdeci">int ad_http_set_response_header(ad_conn_t *conn, const char *name, const char *value)</div><div class="ttdoc">Set response header. </div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8c_source.html#l00231">ad_http_handler.c:231</a></div></div>
<div class="ttc" id="structad__http__s_html_abae1ecb8ffe1c2b514f8a490ed0364c6"><div class="ttname"><a href="structad__http__s.html#abae1ecb8ffe1c2b514f8a490ed0364c6">ad_http_s::bodyin</a></div><div class="ttdeci">size_t bodyin</div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8h_source.html#l00151">ad_http_handler.h:151</a></div></div>
<div class="ttc" id="ad__http__handler_8h_html_a5be41fc8a08dcadf94fc271aeb05b6e2"><div class="ttname"><a href="ad__http__handler_8h.html#a5be41fc8a08dcadf94fc271aeb05b6e2">ad_http_send_data</a></div><div class="ttdeci">size_t ad_http_send_data(ad_conn_t *conn, const void *data, size_t size)</div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8c_source.html#l00367">ad_http_handler.c:367</a></div></div>
<div class="ttc" id="structad__http__s_html_a540f3f70258433ff7568283f6e478261"><div class="ttname"><a href="structad__http__s.html#a540f3f70258433ff7568283f6e478261">ad_http_s::bodyout</a></div><div class="ttdeci">size_t bodyout</div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8h_source.html#l00164">ad_http_handler.h:164</a></div></div>
<div class="ttc" id="structad__http__s_html_a08609c6955339c939e1f46f8e00e164e"><div class="ttname"><a href="structad__http__s.html#a08609c6955339c939e1f46f8e00e164e">ad_http_s::status</a></div><div class="ttdeci">enum ad_http_request_status_e status</div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8h_source.html#l00136">ad_http_handler.h:136</a></div></div>
<div class="ttc" id="structad__conn__s_html"><div class="ttname"><a href="structad__conn__s.html">ad_conn_s</a></div><div class="ttdoc">Connection structure. </div><div class="ttdef"><b>Definition:</b> <a href="ad__server_8h_source.html#l00159">ad_server.h:159</a></div></div>
<div class="ttc" id="ad__http__handler_8h_html_ae6a1a9707180447257fd769b249ee42d"><div class="ttname"><a href="ad__http__handler_8h.html#ae6a1a9707180447257fd769b249ee42d">ad_http_is_keepalive_request</a></div><div class="ttdeci">int ad_http_is_keepalive_request(ad_conn_t *conn)</div><div class="ttdoc">Return whether the request is keep-alive request or not. </div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8c_source.html#l00199">ad_http_handler.c:199</a></div></div>
<div class="ttc" id="structad__http__s_html_a1b087616782ae37954bc9c84efcddfcb"><div class="ttname"><a href="structad__http__s.html#a1b087616782ae37954bc9c84efcddfcb">ad_http_s::headers</a></div><div class="ttdeci">qlisttbl_t * headers</div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8h_source.html#l00147">ad_http_handler.h:147</a></div></div>
<div class="ttc" id="ad__http__handler_8h_html_a048a0e35599f8a884494deba0dbd89b7"><div class="ttname"><a href="ad__http__handler_8h.html#a048a0e35599f8a884494deba0dbd89b7">ad_http_set_response_content</a></div><div class="ttdeci">int ad_http_set_response_content(ad_conn_t *conn, const char *contenttype, off_t size)</div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8c_source.html#l00281">ad_http_handler.c:281</a></div></div>
<div class="ttc" id="structad__http__s_html_a129ec0244515d298b2d27bf99716e0b9"><div class="ttname"><a href="structad__http__s.html#a129ec0244515d298b2d27bf99716e0b9">ad_http_s::domain</a></div><div class="ttdeci">char * domain</div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8h_source.html#l00149">ad_http_handler.h:149</a></div></div>
<div class="ttc" id="ad__http__handler_8h_html_a5492f236970d745247b5f5ba47eb9b82"><div class="ttname"><a href="ad__http__handler_8h.html#a5492f236970d745247b5f5ba47eb9b82">ad_http_request_status_e</a></div><div class="ttdeci">ad_http_request_status_e</div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8h_source.html#l00094">ad_http_handler.h:94</a></div></div>
<div class="ttc" id="ad__http__handler_8h_html_aa54a1f3393b20b70f2769b3d039f3bd7"><div class="ttname"><a href="ad__http__handler_8h.html#aa54a1f3393b20b70f2769b3d039f3bd7">ad_http_response</a></div><div class="ttdeci">size_t ad_http_response(ad_conn_t *conn, int code, const char *contenttype, const void *data, off_t size)</div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8c_source.html#l00308">ad_http_handler.c:308</a></div></div>
<div class="ttc" id="ad__http__handler_8h_html_afeef7409bd771bcf2e29eb6ab70af894"><div class="ttname"><a href="ad__http__handler_8h.html#afeef7409bd771bcf2e29eb6ab70af894">ad_http_get_reason</a></div><div class="ttdeci">const char * ad_http_get_reason(int code)</div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8c_source.html#l00428">ad_http_handler.c:428</a></div></div>
<div class="ttc" id="ad__http__handler_8h_html_aa931a4adcd07f3bc23fe4f183dc4c8dc"><div class="ttname"><a href="ad__http__handler_8h.html#aa931a4adcd07f3bc23fe4f183dc4c8dc">ad_http_get_request_header</a></div><div class="ttdeci">const char * ad_http_get_request_header(ad_conn_t *conn, const char *name)</div><div class="ttdoc">Get request header. </div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8c_source.html#l00140">ad_http_handler.c:140</a></div></div>
<div class="ttc" id="ad__http__handler_8h_html_a5492f236970d745247b5f5ba47eb9b82a83f0b967f8a75292986a0ecc24a3d104"><div class="ttname"><a href="ad__http__handler_8h.html#a5492f236970d745247b5f5ba47eb9b82a83f0b967f8a75292986a0ecc24a3d104">AD_HTTP_REQ_DONE</a></div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8h_source.html#l00098">ad_http_handler.h:98</a></div></div>
<div class="ttc" id="ad__http__handler_8h_html_a4d28e689e120cfa22217507c74683779"><div class="ttname"><a href="ad__http__handler_8h.html#a4d28e689e120cfa22217507c74683779">ad_http_get_content</a></div><div class="ttdeci">void * ad_http_get_content(ad_conn_t *conn, size_t maxsize, size_t *storedsize)</div><div class="ttdoc">Remove content from the in-buffer. </div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8c_source.html#l00172">ad_http_handler.c:172</a></div></div>
<div class="ttc" id="structad__http__s_html_a403c92ef9659a9ba550d17ee9745fd94"><div class="ttname"><a href="structad__http__s.html#a403c92ef9659a9ba550d17ee9745fd94">ad_http_s::contentlength</a></div><div class="ttdeci">off_t contentlength</div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8h_source.html#l00150">ad_http_handler.h:150</a></div></div>
<div class="ttc" id="structad__http__s_html_a77545254e60b3c635c49efa321cfb054"><div class="ttname"><a href="structad__http__s.html#a77545254e60b3c635c49efa321cfb054">ad_http_s::host</a></div><div class="ttdeci">char * host</div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8h_source.html#l00148">ad_http_handler.h:148</a></div></div>
<div class="ttc" id="structad__http__s_html_adb7444a8f1879654976dbde11b27bcee"><div class="ttname"><a href="structad__http__s.html#adb7444a8f1879654976dbde11b27bcee">ad_http_s::inbuf</a></div><div class="ttdeci">struct evbuffer * inbuf</div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8h_source.html#l00137">ad_http_handler.h:137</a></div></div>
<div class="ttc" id="structad__http__s_html_a64ea17af0a96e99853d6fc2a08bfe23b"><div class="ttname"><a href="structad__http__s.html#a64ea17af0a96e99853d6fc2a08bfe23b">ad_http_s::request</a></div><div class="ttdeci">struct ad_http_s::@0 request</div></div>
<div class="ttc" id="ad__http__handler_8h_html_afe22e6f81773c01d316e45009996c4a3"><div class="ttname"><a href="ad__http__handler_8h.html#afe22e6f81773c01d316e45009996c4a3">ad_http_set_response_code</a></div><div class="ttdeci">int ad_http_set_response_code(ad_conn_t *conn, int code, const char *reason)</div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8c_source.html#l00263">ad_http_handler.c:263</a></div></div>
<div class="ttc" id="structad__http__s_html_aa01e34066ff0db7db68172c9089f6e69"><div class="ttname"><a href="structad__http__s.html#aa01e34066ff0db7db68172c9089f6e69">ad_http_s::method</a></div><div class="ttdeci">char * method</div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8h_source.html#l00140">ad_http_handler.h:140</a></div></div>
<div class="ttc" id="ad__http__handler_8h_html_a5492f236970d745247b5f5ba47eb9b82a4f8f5da8e1d8346eba285fd27bcd9811"><div class="ttname"><a href="ad__http__handler_8h.html#a5492f236970d745247b5f5ba47eb9b82a4f8f5da8e1d8346eba285fd27bcd9811">AD_HTTP_REQ_HEADER_DONE</a></div><div class="ttdef"><b>Definition:</b> <a href="ad__http__handler_8h_source.html#l00097">ad_http_handler.h:97</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_9273431fadbcee3009b231da59d31b6f.html">asyncd</a></li><li class="navelem"><a class="el" href="ad__http__handler_8h.html">ad_http_handler.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
